﻿CREATE VIEW [acms].[Page_View]
AS 
	SELECT p.[Id],
		v.[Id] as VersionId,
		v.[SiteId],
		v.[ParentId],
		v.[Name],
		v.[DisplayName]
	FROM [acms].[Pages] p
		INNER JOIN [acms].[PageVersions] v on p.[Id] = v.[PageId]
	WHERE v.[Deleted] = 0
